﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GMap.NET.WindowsForms;
using System.Drawing;
using GMap.NET;

namespace EkspSys.Map
{
    public abstract class GMapSelectableMarker : GMapMarker
    {
        public Pen Pen;

        public GMapSelectableMarker(PointLatLng p)
            : base(p)
        {
            Pen = new Pen(Brushes.Black, 5);
            Size = new Size(15, 15);
            Offset = new Point(-Size.Width / 2, -Size.Height / 2);
            IsSelected = false;
        }

        private bool isSelected;
        public bool IsSelected
        {
            get { return isSelected; }
            set
            {
                if (value == isSelected) return;
                isSelected = value;
                Pen = new Pen(isSelected ? Brushes.Gray : Brushes.Black, isSelected ? 10 : 5);
            }
        }
    }
}
